import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description: 输出一个整数的每一位
 * User: 15085202591
 * Date: 2022-10-31
 * Time: 22:13
 */
public class EachNum {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        while (n != 0){
            System.out.print(n % 10+" ");
            n /= 10;
        }
        System.out.println();
    }
}
